<%--
  Created by IntelliJ IDEA.
  User: 冯根源
  Date: 2020/3/18
  Time: 18:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册页面</title>
</head>
<body>
<p style="color: red;font-weight: 900;">${error}</p>
<h1>注册</h1>
<form action="${pageContext.request.contextPath}/RegisterServlet" method="post">
    用户名：<input type="text" name="username" value="${user.username}"/><p style="color: red;font-weight: 900;">${errors.username}</p><br/>
    密&nbsp;&nbsp;&nbsp;&nbsp;码：<input type="password" name="password" value="${user.password}"/><p style="color: red;font-weight: 900;">${errors.password}</p><br/>
    验证码：<input type="text" name="verifyCode" value="${user.verifyCode}" size="3"/>
    <img src="${pageContext.request.contextPath}/VerifyCodeServlet" onclick="changeCode(this);"><p style="color: red;font-weight: 900;">${errors.verifyCode}</p><br/>
    <input type="submit" val ue="注册"/>
</form>
<script type="text/javascript">
    function changeCode(obj) {

        obj.src = "${pageContext.request.contextPath}/VerifyCodeServlet?a =" + new Date();
    }
</script>
</body>
</html>
